<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#box1,#box2{
				display:inline-block;
				width:100px;
				height:60px;
				border:1px solid gray;
				}
		</style>
		<script type="text/javascript" src="../../jQuery/jquery-3.4.1.js"></script>
		<script type="text/javascript">
			$(function(){
				$("#btn1").click(function(){
					var a = $("#box1").height();
					var b = $("#box1").css("height");
					alert(b + '\n' + a);
				})
				$("#btn2").click(function(){
					$("#box2").height(50)
				})
			})
		</script>
	</head>
	<body>
		<div id="box1"></div>
		<div id="box2"></div> <br>
		<label>获取第1个div的高度：<input type="button" id="btn1" value="获取"/></label> <br>
		<label>设置第2个div的高度：<input type="button" id="btn2" value="设置"/></label>
	</body>
</html>
